var link = location.href;
if(typeof(localStorage.oid) != "undefined" && localStorage.oid != "") {
	$.ajax({
        url : getRequestUrl("/user/get_wx_share_info"),
        type : "GET",
        data:{"url":link},
        async:true,
        dataType:"json",
        success:function (data){
        	var config = data.response_params.result.config;
        	var share = data.response_params.result.share;
        	//alert(JSON.stringify(config));
        	//alert(JSON.stringify(share));
            wx.config(config);
            wx.ready(function(){
            	// 用户点击发送给朋友
                wx.onMenuShareAppMessage(share);  
                // 用户点击分享到朋友圈
                wx.onMenuShareTimeline(share);
                // 用户点击分享到QQ
                wx.onMenuShareQQ(share);
                // 用户点击分享到腾讯微博
                wx.onMenuShareWeibo(share); 
                
                wx.error(function (res) {
                	alert(res.errMsg); 
                });
            });  
            
        },
        error:function (err){
        	dealCPErrorResponse(err);
        }
	});
}
